<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Student extends Model
{
	public $timestamps = false;
    protected $fillable = [
        'no', 'ch_name','en_name', 'sex','squad_id', 'enrollment_time','status', 'grade','school'
    ];

    //学生模型关联班级
    public function squad()
    {
        return $this->belongsTo(Squad::class, 'squad_id'); 
    }
    public function student_attendance()
    {
        return $this->hasMany(Student_attendance::class); 
    }
    public function student_mark()
    {
        return $this->hasMany(Student_mark::class);
    }

    public function apply()
    {
        return $this->hasOne(Apply::class);
    }
}
